package cn.itcast.ssm.service.impl;

import cn.itcast.ssm.mapper.UserMapper;
import cn.itcast.ssm.pojo.User;
import cn.itcast.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceimpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> findUser() {
        List<User> userList = userMapper.selectAll();
        return userList;
    }

    @Override
    public User findUserById(String id) {
        User user = userMapper.findUserById(id);
        return user;
    }
}
